﻿<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title></title>
		<script type="text/javascript">
			//判断有没有getElementsByClassName
			if(!document.getElementsByClassName){
				document.getElementsByClassName = function(classname){
					var temp = [];
					var alldom = document.getElementsByTagName("*");
					for(var i=0; i<alldom.length; i++){
						if(alldom[i].className.indexOf(classname+" ") != -1){
							temp.push(alldom[i]);
						}
					}
					return temp;
				}
			}
			document.getElementsByClassName("hello")
		</script>
     </head>
    <body>
		<div class="hello txt sb"></div>
		<div class="hello"></div>
		<div class="helloworld"></div>
		<div class="hello"></div>
		<div class="hello"></div>
    </body>
</html>
